home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / tex-k-archive.gz / tex-k-archive / 000109_magnan@mathcn.umontreal.ca_Tue Dec 7 11:57:23 1993.msg < prev    next >
Internet Message Format  |  1994-10-11  |  2KB

  1. Received: from condor.CC.UMontreal.CA by cs.umb.edu with SMTP id AA21703
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Tue, 7 Dec 1993 17:37:21 -0500
  3. Received: from maths1.MATHCN.UMontreal.CA by condor.CC.UMontreal.CA with SMTP id AA01077
  4.   (5.65c/IDA-1.4.4 for kb@cs.umb.edu); Tue, 7 Dec 1993 16:58:18 -0500
  5. Received: by maths1.MATHCN.UMontreal.CA (930416.SGI/5.17)
  6.     id AA22802; Tue, 7 Dec 93 16:57:23 -0500
  7. Date: Tue, 7 Dec 93 16:57:23 -0500
  8. From: magnan@mathcn.umontreal.ca (Magnan Francois)
  9. Message-Id: <9312072157.AA22802@maths1.MATHCN.UMontreal.CA>
  10. To: kb@cs.umb.edu
  11. Cc: tex-k@cs.umb.edu
  12. In-Reply-To: <199312062301.AA01943@terminus.cs.umb.edu> (kb@cs.umb.edu)
  13. Subject: Re: xdvik
  14.  
  15.  
  16. Still about xdvik...
  17. The problem is clearly a parsing problem. The function involved is
  18. the following:
  19.  
  20.  /*
  21.  * Simple sscanf version of finding \special parametes.
  22.  * labrea.Stanford.EDU:~ftp/pub/tv001.tar.Z has some better parsing code
  23.  * if you'd like.
  24.  */
  25. static Boolean
  26. parse_special(special, psfilename, llx, lly, urx, ury, rwi)
  27.   char *special, *psfilename;
  28.   int *llx, *lly, *urx, *ury, *rwi;
  29. {
  30.   special += 6; /* skip the ``psfile'' which may be case-mixed */
  31.   if (sscanf(special, "=%s llx=%d lly=%d urx=%d ury=%d rwi=%d",
  32.               psfilename, llx, lly, urx, ury, rwi) == 6) {
  33.     return True;
  34.   } else {
  35.     Moan("\"%s\" not understood.", special);
  36.     return False;
  37.   }
  38. }
  39.  
  40. As you can see, the sscanf looks for integers to initialize the values of
  41. llx, lly, ... The problem is that these parameters are floating point 
  42. parameters in MY dvifile. ( To see that remember that the error was 
  43.  
  44. xdvi: espf: "=graph1.ps llx=3.00 lly=638.00 urx=382.00 ury=792.00 rwi=2790" not understood.)
  45.  
  46. The sscanf just can't match the needed parameters.
  47. The tv001.tar.Z file (suggestion in the comments) contains a file
  48. called dospecial.c that does exactly what we want here. 
  49. I tried to mix the two files together and I got some type incompatibility
  50. errors. I am not very good at this. You should be able to do this very
  51. easily. I know nothing about "register float" and how to handle this. 
  52.  
  53. Can you help?
  54. Thank you very much,
  55.  
  56. Francois Magnan
  57.  
  58.  
  59.